<?php


namespace app\unify\validate;


use think\Validate;
use app\unify\model\Config as ConfigModel;

class Auth extends Validate
{

    const UPDATE = 'Update';
    const SAVE = "Save";

    const DELETE = "Delete";


    protected $rule = [
        'id|编号' => 'require|integer',
        'name|名称' => 'require|length:1,50',
        'tag|标识' => 'require|length:1,100',
        'description|描述' => 'length:1,255',
        'ids|编号集合' => 'require|array',
    ];

    protected $scene = [
        self::SAVE => ['name', 'tag', 'description'],
        self::UPDATE => ['id', 'name', 'tag', 'description'],
        self::DELETE => ['ids'],
    ];

}